/**
 * 
 */
package smallChanges.statements;

import smallChanges.Tokenization.SCToken;
import smallChanges.Tokenization.TokenSet;

/**
 * @author jspacco
 *
 */
public abstract class ConditionalStatementHeader extends StatementHeader
{
	protected MultiTokenCodeRange2D condition;
	
	public ConditionalStatementHeader(TokenSet tokenSet) {
		super(tokenSet);
	}
	
	protected ConditionalStatementHeader(String stmtType, TokenSet tokenSet) {
	    super(stmtType, tokenSet);
	}
	
	
//    public String getCoords() {
//        return condition.getCoords();
//    }
    
    /**
	 * @return the condition
	 */
	public MultiTokenCodeRange2D getCondition()
	{
		return condition;
	}

	/**
	 * @param condition the condition to set
	 */
	public void setCondition(MultiTokenCodeRange2D condition)
	{
		this.condition = condition;
	}

    public void setEndToken(SCToken rightParen)
    {
        setEndLine(rightParen.getEndLine());
        setEndColumn(rightParen.getEndColumn());
        setTokensFromRange();
    }
}
